// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IValueValidator.cs" company="">
//   
// </copyright>
// <summary>
//   The ValueValidator interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Skymate.Runtime.Validation
{
    using System.Collections.Generic;

    /// <summary>
    ///     The ValueValidator interface.
    /// </summary>
    public interface IValueValidator
    {
        /// <summary>
        ///     Gets the name.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// The this.
        /// </summary>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        object this[string key] { get; set; }

        /// <summary>
        ///     Gets the attributes.
        /// </summary>
        IDictionary<string, object> Attributes { get; }

        /// <summary>
        /// The is valid.
        /// </summary>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        bool IsValid(object value);
    }
}